package com.apanal.qlife.advice.model;

import java.util.Date;
import java.util.List;

import com.apanal.qlife.common.model.ModelConvert;
import com.apanal.qlife.org.model.Organization;
import com.apanal.qlife.property.model.Community;
import com.apanal.qlife.sys.model.Area;

public class Advice {
	private Long advId;

	private String advTitle;

	private String advDetails;

	private Date startDate;

	private Integer advType;

	private Integer putInVersion;

	private Integer setType;

	private Integer setTypeDetail;

	private Integer normal;

	private Integer status;

	private Date insertDate;

	private Long insertBy;

	private Date lastUpdateDate;

	private Long lastUpdateBy;

	private String pubState;

	private String stTime;

	private String endTime;
	
	private String startDateNew;
	
	private String userName;
	
	private String  orgIds;
	
	private String aeraIds;
	
	private String commIds;
	
	private String version; //版本中文
	
	private Long platOrgId;
	public Long getPlatOrgId() {
		return platOrgId;
	}

	public void setPlatOrgId(Long platOrgId) {
		this.platOrgId = platOrgId;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getCommIds() {	
	if ((commIds == null || "".equals(commIds)) && communityList != null
				&& !communityList.isEmpty()) {
	   return ModelConvert.getIds(communityList);
	 } else {
			return commIds;
		}
	}

	public void setCommIds(String commIds) {
		this.commIds = commIds;
	}

	public String getAeraIds() {
	if ((aeraIds == null || "".equals(aeraIds)) && areaList != null
				&& !areaList.isEmpty()) {
	   return ModelConvert.getIds(areaList);
	 } else {
			return aeraIds;
		}
	}

	public void setAeraIds(String aeraIds) {
		this.aeraIds = aeraIds;
	}

	public String getOrgIds() {
	if ((orgIds == null || "".equals(orgIds)) && orgList != null
			&& !orgList.isEmpty()) {
		return ModelConvert.getIds(orgList);
	} else {
		return orgIds;
	}
	}

	public void setOrgIds(String orgIds) {
		this.orgIds = orgIds;
	}

	private Integer totalCount; //总查阅人数
	
	public Integer getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(Integer totalCount) {
		this.totalCount = totalCount;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	private List<Organization> orgList; //机构集合
	private List<Area>  areaList; //地域集合
	private List<Community>  communityList;
	public List<Community> getCommunityList() {
		return communityList;
	}

	public void setCommunityList(List<Community> communityList) {
		this.communityList = communityList;
	}

	public List<Area> getAreaList() {
		return areaList;
	}

	public void setAreaList(List<Area> areaList) {
		this.areaList = areaList;
	}

	public List<Organization> getOrgList() {
		return orgList;
	}

	public void setOrgList(List<Organization> orgList) {
		this.orgList = orgList;
	}
	

	public String getStartDateNew() {
		return startDateNew;
	}

	public void setStartDateNew(String startDateNew) {
		this.startDateNew = startDateNew;
	}

	public String getStTime() {
		return stTime;
	}

	public void setStTime(String stTime) {
		this.stTime = stTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public String getPubState() {
		return pubState;
	}

	public void setPubState(String pubState) {
		this.pubState = pubState;
	}

	public Long getAdvId() {
		return advId;
	}

	public void setAdvId(Long advId) {
		this.advId = advId;
	}

	public String getAdvTitle() {
		return advTitle;
	}

	public void setAdvTitle(String advTitle) {
		this.advTitle = advTitle == null ? null : advTitle.trim();
	}

	public String getAdvDetails() {
		return advDetails;
	}

	public void setAdvDetails(String advDetails) {
		this.advDetails = advDetails == null ? null : advDetails.trim();
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Integer getAdvType() {
		return advType;
	}

	public void setAdvType(Integer advType) {
		this.advType = advType;
	}

	public Integer getPutInVersion() {
		return putInVersion;
	}

	public void setPutInVersion(Integer putInVersion) {
		this.putInVersion = putInVersion;
	}

	public Integer getSetType() {
		return setType;
	}

	public void setSetType(Integer setType) {
		this.setType = setType;
	}

	public Integer getSetTypeDetail() {
		return setTypeDetail;
	}

	public void setSetTypeDetail(Integer setTypeDetail) {
		this.setTypeDetail = setTypeDetail;
	}

	public Integer getNormal() {
		return normal;
	}

	public void setNormal(Integer normal) {
		this.normal = normal;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getInsertDate() {
		return insertDate;
	}

	public void setInsertDate(Date insertDate) {
		this.insertDate = insertDate;
	}

	public Long getInsertBy() {
		return insertBy;
	}

	public void setInsertBy(Long insertBy) {
		this.insertBy = insertBy;
	}

	public Date getLastUpdateDate() {
		return lastUpdateDate;
	}

	public void setLastUpdateDate(Date lastUpdateDate) {
		this.lastUpdateDate = lastUpdateDate;
	}

	public Long getLastUpdateBy() {
		return lastUpdateBy;
	}

	public void setLastUpdateBy(Long lastUpdateBy) {
		this.lastUpdateBy = lastUpdateBy;
	}
}